package com.dlc.apk.receiver

import android.content.BroadcastReceiver
import android.content.Context
import android.content.Intent
import android.widget.Toast
import com.dlc.apk.ui.activity.MainActivity

class UpdateRestartReceiver : BroadcastReceiver() {
    override fun onReceive(context: Context, intent: Intent) {
        Toast.makeText(context, "已升级版本", Toast.LENGTH_SHORT).show()
        val intent2 = Intent(context, MainActivity::class.java)
        intent2.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
        context.startActivity(intent2)
    }
}